package com.airforcehospital;

import com.alibaba.fastjson2.JSONObject;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@RestController
public class AirForceSubmitController {

    //http://localhost:8080/submit?sname=09:00&ename=09:30&docId=50913244&deptId=1318754&deptName=%E7%9A%AE%E8%82%A4%E7%A7%91%E9%97%A8%E8%AF%8A
    @RequestMapping("submit")
    public String submit(String sTime,String eTime,String docId,String deptId,String deptName){
        System.out.println(sTime);
        return AirHttpTool2.submit(sTime,eTime,docId,deptId,deptName).toString();
    }

    @RequestMapping("session")
    public String session(HttpServletRequest request){
        return request.getSession().getId();
    }

}
